#! /usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) JoinQuant Development Team
# Author: Huayong Kuang <kuanghuayong@joinquant.com>

import os

pid = os.fork()
if pid == 0:
    print("I am a subprocess, pid is %s" % os.getpid())
    raise Exception("test")
else:
    print("I am a master, pid is %s" % os.getpid())
    print os.waitpid(pid, 0)
